import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/login',
      name:'login',
      component: ()=>import('@/pages/Login')
    },
    {
      path:'/admin',
      name:'admin',
      component: () => import('@/pages/Admin'),
      children:[
        {
          path:'index',
          name:'admin_index',
          component:()=>import('@/pages/Admin/Index')
        },
        {
          path:'users',
          name:'admin_users',
          component:()=>import('@/pages/Admin/Users')
        }
      ]
    }
  ]
})
